/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 * @section DESCRIPTION
 *
 */

#ifndef __TSIN_LIBRARY_TIMEOUTTRIGGER_HPP__
#define __TSIN_LIBRARY_TIMEOUTTRIGGER_HPP__

#include <tsin/library/common.hpp>
#include <tsin/library/Trigger.hpp>

namespace tsin {

        class LIBRARY_DLLEXPORT TimeoutTrigger : public Trigger {
        public:
                TimeoutTrigger();
                ~TimeoutTrigger();

                void init(int timeout);
                virtual void reinit();

                virtual bool trigger();

        private:
                int counter, timeout;
        };

}

extern "C" LIBRARY_DLLEXPORT tsin::DynamicObject *bindTimeoutTrigger();

#endif /* __TSIN_LIBRARY_TIMEOUTTRIGGER_HPP__ */
